﻿using System;
using System.Windows.Forms;

namespace SixthClassAssignment{
    
    public partial class FunctionWindow : Form{


        private void Stu_Click(object sender,EventArgs e){
            var window = new StuWindow();
            window.Show();
            Hide();
        }
        private void Cls_Click(object sender,EventArgs e){
            var window = new ClsWindow();
            window.Show();
            Hide();
        }
        private void Sch_Click(object sender,EventArgs e){
            var window = new SchWindow();
            window.Show();
            Hide();
        }
        private void Log_Click(object sender,EventArgs e){
            var window = new LogWindow();
            window.Show();
            Hide();
        }
        private void AddEvent(){
            stuMng.Click += Stu_Click;
            clsMng.Click += Cls_Click;
            schMng.Click += Sch_Click;
            logInfo.Click += Log_Click;
        }
        public FunctionWindow(string username){
            InitializeComponent();
            welcome.Text = "[" + username + "]欢迎您";
            AddEvent();
        }
    }
}